<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>后台管理中心</title>  
    <%@ include file="top.jsp"%> 
</head>
<body style="background-color:#f2f9fd;">
<div class="header bg-main">
  <div class="logo margin-big-left fadein-top">
    <h1><img src="images/y.jpg" class="radius-circle rotate-hover" height="50" alt="" />文章管理中心</h1>
  </div>
  <div class="head-l" style="width: 85%">当前用户: ${fnickname} &nbsp;&nbsp;<a class="button button-little bg-red"  id="bt_outLogin"><span class="icon-power-off"></span> 退出登录</a> </div>
</div>
<div class="leftnav">
  <div class="leftnav-title"><strong><span class="icon-list"></span>菜单列表</strong></div>
  <h2><span class="icon-user"></span>基本设置</h2>
  <ul style="display:block">
    <li><a href="/info.html" target="right" id = "set_1_1"><span class="icon-caret-right"></span>用户管理</a></li>
    <li><a href="/pass.html" target="right" id = "set_1_2"><span class="icon-caret-right"></span>文章分类</a></li>
    <li><a href="<%=basePath %>tdic/author_index" target="right" id = "set_1_3"><span class="icon-caret-right"></span>作者管理</a></li>  
    <li><a href="/adv.html" target="right" id = "set_1_4"><span class="icon-caret-right"></span>图片管理</a></li>   
  </ul>   
  <h2><span class="icon-pencil-square-o"></span>文章管理</h2>
  <ul>
    <li><a href="/list.html" target="right"><span class="icon-caret-right"></span>内容管理</a></li>
  </ul>  
  <h2><span class="icon-wrench"></span>发布设置</h2>
  <ul>
    <li><a href="/list.html" target="right"><span class="icon-caret-right"></span>发布地址</a></li>
  </ul>
   <h2></h2>
</div>
<script type="text/javascript">
$(function(){
  $(".leftnav h2").click(function(){
	  $(this).next().slideToggle(200);	
	  $(this).toggleClass("on"); 
  });
  $(".leftnav ul li a").click(function(){
	  	//var v_li = "<li class='layui-this'><a href='#' id="+$(this).attr("id")+">"+$(this).text()+"</a>";
	  	//v_li += "<i class='layui-icon layui-unselect layui-tab-close' data_id="+$(this).attr("id")+">&times;</i></li>"
	  	//$(".bread").append(v_li);  
	  	//$(".leftnav ul li a").removeClass("on");
	  	//$(this).addClass("on");
	  	
	    $("#a_leader_txt").text($(this).text());
	    $("#a_leader_txt").attr("href",$(this).attr("href"));
  		$(".leftnav ul li a").removeClass("on");
		$(this).addClass("on");
  });
  $("#bt_outLogin").click(function(){
	  outLongin();
	});
});
function outLongin(){
	$.ajax({
	    type: "post",
	    dataType: 'json',
	    url : "<%=basePath%>user/outLogin",   //提交的路径
	    success:function(data){
	    	if (data.errorCode == 0) {
	    		window.location.href="<%=basePath%>loginOut"; 
			}else{
				layer.msg(data.message, {icon: 5, offset: '10px'});
			};
			layer.close(index); 
		}
	});
}
</script>
<ul class="bread">
  <li><a href="{:U('Index/info')}" target="right" class="icon-home"> 首页</a></li>
  <li><a href="##" id="a_leader_txt" target="right">网站信息</a></li>
</ul>
<div class="admin">
  <iframe scrolling="auto" rameborder="0" src="info.html" name="right" width="100%" height="100%"></iframe>
</div>
<div style="text-align:center;">
</div>
</body>
</html>